<?php 
$sql =	"SELECT
			  c.page_id,
			  d.title,
			  d.description,
			  d.meta_key,
			  d.meta_description	
		  FROM
			  pages AS c,
			  page_description AS d
		  WHERE
		  
			  c.page_id = d.page_id
			  AND
			  d.lang_id = '".$_SESSION['lang_id']."'
			  AND
			  c.sef_url = '".$sef_url."' 
			  AND c.published
		  ";
$result = query($sql);
$row = mysql_fetch_object($result);


head(sth($row->title),sth($row->meta_description));

?>
<script type="text/javascript" src="<?=HTML_BASE?>js/jquery.carouFredSel-6.2.1-packed.js"></script>
<script type="text/javascript" src="<?=HTML_BASE?>js/jquery.touchSwipe.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	// Tabs
	$(".tabs").carouFredSel({
		circular: false,
		responsive: true,
		items: 1,
		width: '100%',
		auto: false,
		pagination: {
			container: '.tab-links',
			anchorBuilder: function( nr ) {
				return '<a href="#">' + $(this).attr('data-title'); + '</a>';
			}
		}
	});
});
</script>

		<div id="content">
			
			<div class="left full">
				<h1><?=stripslashes($row->title)?></h1>
				 
				 <?=stripslashes($row->description)?>
                
			</div>
            
            
            <div class="full left">
				
				<div class="tab-links">
					
				</div>
				
				<div class="tabswrap"><div class="tabs">
                
                <?php
                		$sql_tab =	"SELECT
						 
						  d.title,
						  d.description	
					  FROM
						  pages AS c,
						  page_description AS d
					  WHERE
					  
						  c.page_id = d.page_id
						  AND
						  d.lang_id = '".$_SESSION['lang_id']."'
						  AND
						  c.sef_url LIKE 'faq-%' 
						  AND c.published
						  
						  ORDER BY c.order_number DESC
					  ";
					$result_tab = query($sql_tab);
					while($row_tab = mysql_fetch_object($result_tab))
					{
				
						
				?>
					
					<div data-title="<?=sth($row_tab->title)?>">
						
						 <?=stripslashes($row_tab->description)?>
						
					</div>
                    
                    <?php }?>
					
				</div></div>
			
			
            </div>
            
       </div>
	
<?php

foot();
?>